<template>
  <div>
    <div class="content">
      <div class="header">
        <!-- 修改表单区域 -->
        <el-form :inline="true" :model="formInline" class="demo-form-inline">
          <el-form-item label="搜索类型" style="width: 200px">
            <el-select
              v-model="formInline.key_type"
              placeholder="请选择"
              style="width: 200px"
              @change="getselect1()"
            >
              <el-option
                v-for="item in searchselectdata"
                :key="item.value"
                :label="item.lable"
                :value="item.value"
              />
            </el-select>
          </el-form-item>
          <!-- <el-form-item label="创建时间">
						<el-date-picker v-model="formInline._create_time" type="datetimerange" range-separator="To"
							start-placeholder="Start date" end-placeholder="End date" />
					</el-form-item> -->
          <el-form-item label="搜索关键字">
            <el-input
              v-model="formInline._key_word"
              placeholder="请输入关键字"
              clearable
            />
          </el-form-item>
          <el-form-item label="用户ID">
            <el-input
              v-model="formInline.user_id"
              placeholder="请输入用户ID"
              clearable
            />
          </el-form-item>
          <el-form-item label="订单状态" style="width: 200px" v-show="!heShow">
            <el-select
              v-model="formInline._status"
              placeholder="请选择订单状态"
              style="width: 200px"
              @change="getselect2()"
            >
              <el-option
                v-for="item in orderstatuslist"
                :key="item.value"
                :label="item.lable"
                :value="item.value"
              />
            </el-select>
          </el-form-item>

          <el-form-item label="商品类型" v-show="!heShow">
            <el-select
              v-model="formInline._goods_type"
              placeholder="请选择商品类型"
              style="width: 200px"
              @change="getselect3()"
            >
              <el-option
                v-for="item in goodstypelist"
                :key="item.value"
                :label="item.lable"
                :value="item.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="下单来源" v-show="!heShow">
            <el-select
              v-model="formInline._goods_from"
              placeholder="请选择下单来源"
              style="width: 200px"
              @change="getselect4()"
            >
              <el-option
                v-for="item in dockinglist"
                :key="item.value"
                :label="item.lable"
                :value="item.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="供应商编号" v-show="!heShow">
            <el-input
              v-model="formInline.supplier_id"
              placeholder="请输入供应商编号"
              clearable
            />
          </el-form-item>
          <el-form-item label="渠道" v-show="!heShow">
            <el-select
              v-model="formInline.docking_id"
              placeholder="请选择渠道"
              style="width: 200px"
              @change="getselect5()"
            >
              <el-option
                v-for="item in orderfrom"
                :key="item.value"
                :label="item.lable"
                :value="item.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="成本价" v-show="!heShow">
            <el-input
              v-model="formInline.cost_price"
              placeholder="请输入成本价"
              clearable
            />
          </el-form-item>
          <el-form-item label="销售单价" v-show="!heShow">
            <el-input
              v-model="formInline.price"
              placeholder="请输入销售单价"
              clearable
            />
          </el-form-item>

          <el-form-item label="订单时间范围" v-show="!heShow">
            <el-date-picker
              v-model="ranges"
              type="daterange"
              range-separator="To"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              @change="handleChange"
              ref="datePicker"
            />
          </el-form-item>

          <el-form-item>
            <el-button type="primary" @click="submitSee">查询</el-button>
            <el-button type="primary" plain @click="onSubmit">重置</el-button>
            <span class="he" v-show="!heShow" @click="btnHe2">
              合并
              <el-icon><ArrowUp /></el-icon>
            </span>
            <span class="he" v-show="heShow" @click="btnHe">
              展开
              <el-icon><ArrowDown /></el-icon>
            </span>
          </el-form-item>
        </el-form>
      </div>
      <div class="area">
        <el-dropdown style="margin-left: 12px">
          <el-button type="primary">
            更多操作
            <el-icon class="el-icon--right"><arrow-down /></el-icon>
          </el-button>
        
          <template #dropdown>
            <el-dropdown-menu>
              <el-dropdown-item>
                <span @click="btnDengji">用户级别修改</span>
              </el-dropdown-item>
              <el-dropdown-item>
                <span @click="btnUser">用户状态修改</span>
              </el-dropdown-item>
              <el-dropdown-item>
                <span @click="btnShang">上级绑定解绑</span>
              </el-dropdown-item>
              <el-dropdown-item>
                <span @click="btnJiao">交易密码开关</span>
              </el-dropdown-item>
              <el-dropdown-item>
                <span @click="btnWixin">解除微信绑定</span>
              </el-dropdown-item>
              <el-dropdown-item>
                <span @click="btnQQ">解除QQ绑定</span>
              </el-dropdown-item>
              <el-dropdown-item>
                <span @click="openSend">批量发送短信</span>
              </el-dropdown-item>
            </el-dropdown-menu>
          </template>
        </el-dropdown>
        <RouterLink 
        to="/setup/notice?userId=123"

         >
           <el-button type="primary" plain style="margin-left: 12px;" @click="openUser">用户配置</el-button>
          </RouterLink>
       
        <div class="table-area">
          <el-table
            border
            :data="dataList"
            stripe
            style="width: 100%"
            @selection-change="handleSelectionChange"
          >
            <el-table-column type="selection" width="55"   align="center" />
            <el-table-column type="expand">
              <template #default="props">
                <div>
                  <div class="lie-top">
                    <div class="inputs2">
                      <el-input
                        class="lie-input"
                        disabled
                        v-model="props.row.children.name"
                      >
                        <template #prepend>真实姓名</template>
                      </el-input>
                    </div>
                    <div class="inputs2">
                      <el-input
                        class="lie-input"
                        disabled
                        v-model="props.row.children.mobile"
                      >
                        <template #prepend>手机号码</template>
                      </el-input>
                    </div>
                    <div class="inputs2">
                      <el-input
                        class="lie-input"
                        disabled
                        v-model="props.row.children.qq"
                      >
                        <template #prepend>QQ号码</template>
                      </el-input>
                    </div>
                  </div>
                  <div class="lie-top" style="margin-top: 6px">
                    <div class="inputs2">
                      <el-input
                        class="lie-input"
                        disabled
                        v-model="props.row.children.email"
                      >
                        <template #prepend>电子邮箱</template>
                      </el-input>
                    </div>
                    <div class="inputs2">
                      <el-input
                        class="lie-input"
                        disabled
                        v-model="props.row.children.reTime"
                      >
                        <template #prepend>注册时间</template>
                      </el-input>
                    </div>
                    <div class="inputs2">
                      <el-input
                        class="lie-input"
                        disabled
                        v-model="props.row.children.reip"
                      >
                        <template #prepend>注册IP</template>
                      </el-input>
                    </div>
                  </div>
                </div>
              </template>
            </el-table-column>

            <el-table-column
              prop="id"
              align="center"
              label="用户编号"
              #default="scope"
              width="160"
            >
              <div style="cursor: pointer">
                <span
                  style="color: #1890ff"
                  @click="btnOrdersn(scope.row.id)"
                  >{{ scope.row.id }}</span
                >
                <span
                  @click="btnOrdersn(scope.row.id)"
                  style="position: relative; top: 2px; left: 6px"
                  ><el-icon> <CopyDocument /> </el-icon
                ></span>
              </div>
            </el-table-column>
            <el-table-column
              prop="goods_name"
              align="center"
              label="头像"
              #default="scope"
              width="100"
            >
              <div>
                <img
                  style="width: 50px; height: 50px"
                  @click="openImagePreview(scope.row.headurl_img)"
                  v-if="scope.row.headurl_img"
                  class="imgs"
                  :src="scope.row.headurl_img"
                  alt=""
                />
                <!-- 
                  <el-icon v-if="!scope.row.headurl_img" :size="60"
                  ><Picture
                /></el-icon> -->
                <img
                  v-if="!scope.row.headurl_img"
                  style="width: 50px; height: 50px"
                  src="@/assets/imgs.png"
                  alt=""
                />
              </div>
            </el-table-column>

            <el-table-column
              prop="username"
              align="center"
              label="用户名"
              width="100"
              #default="scope"
            >
              <el-tooltip
                class="box-item"
                effect="dark"
                :content="scope.row.username"
                placement="top-start"
              >
                <div class="nameshopping" style="color: #1890ff">
                  {{ scope.row.username }}
                </div>
              </el-tooltip>
            </el-table-column>
            <el-table-column
              align="center"
              prop="company"
              label="名称"
              #default="scope"
            >
              <el-tooltip
                class="box-item"
                effect="dark"
                :content="scope.row.company"
                placement="top-start"
              >
                <div class="nameshopping" style="color: #1890ff">
                  {{ scope.row.company }}
                </div>
              </el-tooltip>
            </el-table-column>
            <el-table-column
              align="center"
              prop="_level_name"
              label="用户等级"
              #default="scope"
            >
              <span
                style="color: #1890ff; cursor: pointer"
                @click="btnDeng(scope.row)"
                >{{ scope.row._level_name }}</span
              >
            </el-table-column>
            <el-table-column
              align="center"
              prop="balance"
              label="余额"
              #default="scope"
            >
              <span
                @click="btnbalance(scope.row)"
                style="color: #1890ff; cursor: pointer"
                >{{ scope.row.balance }}</span
              >
            </el-table-column>
            <el-table-column
              align="center"
              prop="supply_money"
              label="消费"
              #default="scope"
            >
              <span>{{ scope.row.cost }}</span>
            </el-table-column>
            <el-table-column
              align="center"
              prop="commission_money"
              label="佣金"
              #default="scope"
            >
              <span>{{ scope.row.commission_money }}</span>
            </el-table-column>
            <el-table-column
              align="center"
              prop="child_count"
              label="下级数"
              #default="scope"
            >
              <span
                style="color: #1890ff; cursor: pointer"
                @click="btnXia(scope.row)"
                >{{ scope.row.child_count }}</span
              >
            </el-table-column>
            <el-table-column
              align="center"
              prop="pid"
              label="上级ID"
              #default="scope"
            >
              <span
                style="cursor: pointer"
                @click="btnSee3(scope.row, 0)"
                :style="{ color: scope.row.pid == 0 ? '#000000' : '#1890ff' }"
              >
                {{ scope.row.pid == 0 ? "-" : scope.row.pid }}
              </span>
            </el-table-column>基础信息
            <el-table-column
              align="center"
              prop="status"
              label="状态"
              #default="scope"
            >
              <div>
                <el-switch
                  @change="getCahnge(scope.row)"
                  v-model="scope.row.status"
                />
              </div>
            </el-table-column>
            <el-table-column
              align="center"
              fixed="right"
              label="操作"
              min-width="240"
            >
              <template #default="scope">
                <div
                  :style="
                    isMobile ? 'display: flex; flex-direction: column;' : ''
                  "
                >
                  <el-button
                    type="primary"
                    size="small"
                    @click="btnEditn(scope.row, 0)"
                    style="margin-bottom: 5px"
                    >编辑</el-button
                  >
                  <el-button
                    type="primary"
                    plain
                    size="small"
                    @click="btnSee(scope.row, 0)"
                    style="margin-bottom: 5px"
                    >详情</el-button
                  >
                  <el-button
                    type="danger"
                    plain
                    size="small"
                    @click="handleDelete(scope.row.id)"
                    >删除</el-button
                  >
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>

        <!-- 新增分页组件 -->
        <div class="pagination-container">
          <el-pagination
            :current-page="currentPage"
            :page-size="pageSize"
            :total="total"
            :page-sizes="[10, 20, 30, 50]"
            layout="total, sizes, prev, pager, next, jumper"
            @size-change="handlePageSizeChange"
            @current-change="handleCurrentPageChange"
          />
        </div>
      </div>
    </div>

    <!-- 详情 -->
    <el-drawer v-model="drawer" :size="'50vw'" :with-header="false">
      <div class="contents-title">
        <!-- <div>订单信息</div>
        <div><el-button type="primary">订单处理</el-button></div> -->
      </div>
      <div class="img-content">
        <div class="img-left">
          <div>
            <img
              class="imgsleft"
              v-if="orderObj.headurl_img"
              :src="orderObj.headurl_img"
              alt=""
            />
            <el-icon
              class="icons2"
              v-if="!orderObj.headurl_img"
              :size="50"
              :color="color"
            >
              <PictureFilled />
            </el-icon>
          </div>
        </div>
        <div class="right-name">
          <div style="margin-left: 7px;">{{ orderObj.company }} <span style="opacity: 0;">1</span> </div>
          <div class="bianhao" @click="btnDetailDengji">
            <span style="color: black">等级</span> ： {{ dengji }}
            <!-- <span
              @click="btnOrdersn2(orderObj.ordersn)"
              style="position: relative; top: 2px; cursor: pointer"
              ><el-icon> <CopyDocument /> </el-icon
            ></span> -->
          </div>
        </div>
      </div>

      <div class="types">
        <div class="type-name">
          <div>余额</div>
          <div class="quxiao">
            <div class="table-name">{{ orderObj.balance }}元</div>
          </div>
        </div>
        <div class="type-name">
          <div>佣金</div>
          <div style="margin-top: 8px">￥{{ orderObj.commission_money }}</div>
        </div>
        <div class="type-name">
          <div>冻结</div>
          <div style="margin-top: 8px">￥{{ orderObj.freez_money }}</div>
        </div>
        <div class="type-name">
          <div>消费金额</div>
          <div style="margin-top: 8px">
            {{ orderObj.cost || "" }}
          </div>
        </div>
        <div class="type-name">
          <div>供货余额</div>
          <div style="margin-top: 8px">
            {{ orderObj.supply_money || "" }}
          </div>
        </div>
        <div class="type-name">
          <div>推广收入</div>
          <div style="margin-top: 8px">
            {{ orderObj.income || "" }}
          </div>
        </div>
      </div>
      <div class="areas">
        <div class="areas-header">
          <div class="area-tab">
            <div
              class="area-name"
              v-for="(item, index) in tabsList"
              :key="index"
              :class="{ activeTabs: activeTab == index }"
              @click="btnActive(index)"
            >
              {{ item.name }}
            </div>
          </div>
          <!-- 订单详情 -->
          <div class="area-tabs">
            <div v-show="activeTab == 0">
              <div class="order-detail">
                <div class="order-information" style="font-size: 14px">
                  <div class="shu"></div>
                  <span style="position: relative; left: 12px">基础信息</span>
                </div>
                <div style="margin-top: 12px">
                  <div class="order-names">
                    <div class="orders-names" style="width: 298px">
                      客户编号：{{  pids}}
                      <span
                        @click="btnOrdersn2(pids)"
                        style="position: relative; top: 2px; cursor: pointer"
                        ><el-icon> <CopyDocument /> </el-icon
                      ></span>
                    </div>
                    <div class="orders-names" style="width: 298px">
                      登录账号：{{ orderObj.username }}
                      <span
                        @click="btnOrdersn2(orderObj.username)"
                        style="position: relative; top: 2px; cursor: pointer"
                        ><el-icon> <CopyDocument /> </el-icon
                      ></span>
                    </div>
                    <div class="orders-names">
                      真实姓名：{{ orderObj.name }}
                    </div>
                  </div>
                  <div class="order-names">
                    <div class="orders-names" style="width: 298px">
                      手机号码：{{ orderObj.mobile || "" }}
                    </div>
                    <div class="orders-names" style="width: 298px">
                      邮箱：{{ orderObj.email }}
                    </div>
                    <div class="orders-names">
                      用户地址：{{ orderObj.address }}
                    </div>
                  </div>
                </div>
              </div>
              <div class="order-detail">
                <div class="order-information" style="font-size: 14px">
                  <div class="shu"></div>
                  <span style="position: relative; left: 12px">安全管理</span>
                </div>
                <div style="margin-top: 12px">
                  <div class="order-names">
                    <div class="orders-names" style="width: 360px">
                      登录密码：
                      <span class="mima" @click="btnpassword">重置密码</span>
                    </div>
                    <div class="orders-names" style="width: 360px">
                      交易密码:
                      <el-switch
                      v-model="value2"
                      class="ml-2"
                     @change="btnopenaccountpay2"
                    /><span class="mima" @click="btnpassword2">重置密码</span>
                      <!-- <el-switch
                        v-model="noneed_userinput_pass"
                        @change="btnopenaccountpay2"
                      /><span class="mima" @click="btnpassword2">重置密码</span> -->
                      <!-- <span style="color: #1890ff;">交易密码</span> -->
                    </div>
                    <div class="orders-names" style="width: 360px">
                      微信绑定： <span>{{ orderObj.weixin_nickname }}</span>
                      <span
                        v-show="orderObj.weixin_nickname"
                        style="color: #1890ff; margin-left: 12px"
                        @click="btnWixin2"
                        >解绑</span
                      >
                      <span v-show="!orderObj.weixin_nickname">无绑定</span>
                    </div>
                  </div>
                  <div class="order-names">
                    <div class="orders-names" style="width: 298px">
                      QQ登录：{{ orderObj.quantity }}
                      <span
                        v-show="orderObj.quantity"
                        style="color: #1890ff"
                        @click="btnQQ2"
                        >解绑</span
                      >
                      <span v-show="!orderObj.quantity">无绑定</span>
                    </div>
                    <div class="orders-names" style="width: 360px">
                      接口密钥：
                      <span
                        style="color: #1890ff; cursor: pointer"
                        @click="btnpassword3"
                        >重置密钥</span
                      >
                    </div>
                  </div>
                </div>
              </div>

              <div class="order-detail" style="height: 192px">
                <div class="order-information">
                  <div class="shu"></div>
                  <span style="position: relative; left: 12px">用户概况</span>
                </div>
                <div style="margin-top: 12px">
                  <div class="order-names">
                    <div class="orders-names" style="width: 298px">
                      用户状态：
                      <el-switch v-model="orderObj.status" @change="getShow5" />
                    </div>
                    <div
                      class="orders-names"
                      style="width: 298px; cursor: pointer"
                      @click="btnDetailDengji"
                    >
                      用户等级：

                      <!-- <el-table :data="dataUser" stripe style="width:60%">
                        <el-table-column prop="lable" label="用户等级" />
                       
                      </el-table> -->
                      <span style="color: #1890ff"> {{ dengji }}</span>
                    </div>
                    <div>
                      上级用户：{{ orderObj.pid == 0 ? "-" : orderObj.pid }}
                      <span
                        style="
                          color: #1890ff;
                          margin-left: 12px;
                          cursor: pointer;
                        "
                        @click="btnOp2"
                      >
                        {{ orderObj.pid == 0 ? "绑定" : "强制解绑" }}
                      </span>
                    </div>
                  </div>
                  <div class="order-names">
                    <div class="orders-names" style="width: 358px">
                      注册时间：{{ orderObj.reg_time }}
                    </div>
                    <div class="orders-names" style="width: 358px">
                      登录时间：{{ orderObj.last_login_time }}
                    </div>
                    <div class="orders-names" style="width: 358px">
                      注册IP地址：{{ orderObj.reg_ip }}
                    </div>
                  </div>
                  <div class="order-names">
                    <div class="orders-names" style="width: 358px">
                      是否团长：<el-switch
                        v-model="orderObj.is_team_head"
                        @change="getShow"
                      />
                    </div>

                    <div class="orders-names" style="width: 358px">
                      转账权限：
                      <el-switch
                        v-model="orderObj.turn_money"
                        @change="getShow2"
                      />
                    </div>
                    <div class="orders-names" style="width: 358px;">
                      供货权限：<el-switch
                        v-model="owner_goods"
                        @change="getShowGood"
                      />
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <!-- 余额明细 -->
            <div v-show="activeTab == 1">
              <!-- <div class="zanwu" v-show="!zanwuShow">暂无操作</div> -->
              <el-form
                :inline="true"
                style="margin-top: 20px"
                :model="formInline"
                class="demo-form-inline"
              >
              <el-form-item label="交易类型">
                  <el-form-item>
                    <el-select v-model="trade_type" style="width: 100px;" >
                  <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.lable"
                    :value="item.value"
                  />
                </el-select>
                  </el-form-item>
               
                </el-form-item>
                <el-form-item label="客户编号">
                  <el-form-item>
                    <el-input
                      v-model="pids"
                      placeholder="请输入关键字"
                      clearable
                    />
                  </el-form-item>
               
                </el-form-item>

                <el-form-item style="width: 230px">
                  <el-date-picker
                  v-model="ranges"
                type="daterange"
                range-separator="To"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                @change="getTime2"
                value-format="YYYY-MM-DD HH:mm:ss"

                />
                </el-form-item>
                <el-button
                  type="primary"
                  @click="userSee2"
                  style="position: relative; top: -10px"
                  >查询</el-button
                >
              </el-form>
              <el-table :data="yueList" style="width: 100%">
                <el-table-column prop="uid" label="客户编号" />
                <el-table-column prop="company" label="昵称" />
                <el-table-column prop="_trade_type_text" label="交易类型" />
                <el-table-column prop="_change_type_text" label="变动类型" />
                <el-table-column prop="money" label="交易金额" />
                <el-table-column prop="before" label="变化(前)" />
                <el-table-column prop="after" label="变化(后)" />
                <el-table-column prop="_create_time" label="交易日期" />

                <!-- <el-table-column prop="_create_time" label="操作" >
                  <el-button type="primary" size="small">详情</el-button>
                  </el-table-column>
             -->
              </el-table>
              <el-pagination
                style="display: flex; justify-content: end; margin-top: 15px"
                :current-page="yuepage"
                :page-size="yuelimit"
                :total="yuecont"
                :page-sizes="[10, 20, 30, 50]"
                layout="total, sizes, prev, pager, next, jumper"
                @size-change="yuechange"
                @current-change="yuecurrent"
              />
            </div>

            <!-- 支付记录 -->
            <div v-show="activeTab == 2">
              
              <div style="display: flex;flex-wrap: wrap">
                <div class="searchtype" >
                
                <div style="margin-left: 5px;">
                  <el-input
                v-model="_key_word"
               
              >
                <template #prepend>
                  <el-select v-model="_key_type" placeholder="Select" style="width: 105px">
                    <el-option
                    v-for="item in searchList"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  />
                  </el-select>
                </template>
                
              </el-input>
                </div>
              </div>
                <div>
                  <span>支付方式</span>
                  <el-select
                    style="margin-top: 12px; width: 130px" 
                    clearable 
                    v-model="_pay_way"
                    class="m-2"
                  >
                    <el-option
                      v-for="item in zhifuleixList"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </div>
             
               
                <div style="margin-left: 12px;">
                  <span>支付终端</span>
                  <el-select
                    style="margin-top: 12px; width: 130px" 
                    clearable 
                    v-model="_pay_source"
                    class="m-2"
                  >
                    <el-option
                      v-for="item in zongduanList"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </div>
              
                <div style="margin-left: 12px;">
                  <span>支付状态</span>
                  <el-select
                    style="margin-top: 12px; width: 130px" 
                    clearable 
                    v-model="_dual_status"
                    class="m-2"
                  >
                    <el-option
                      v-for="item in zhifuzhuangtai"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>

                  <el-date-picker
                  v-model="ranges2"
                type="daterange"
                range-separator="To"
                style="width: 200px;position: relative;top: 1px;"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                @change="getTime3"
                value-format="YYYY-MM-DD HH:mm:ss"

                />
               
                </div>
                
                <el-button type="primary" style="margin-left: 12px;margin-top: 10px;" @click="btnSearch">搜索</el-button>
              </div>
              <el-table :data="jiluList" style="width: 100%; margin-top: 24px">
                <el-table-column prop="_payment_time" label="支付时间" />
                <el-table-column prop="_payment_type_text" label="支付类型" />
                <el-table-column prop="price" label="金额" />
                <el-table-column prop="service_price" label="手续费" />
                <el-table-column prop="total_price" label="支付金额" />
                <el-table-column prop="order_sn" label="商户单号" />
                <el-table-column
                  prop="_payment_gateway_text"
                  label="支付网关"
                />
                <el-table-column prop="nickname" label="支付客户" />
                <el-table-column prop="_status_text" label="支付状态" />
                <el-table-column prop="_extend_time" label="支付返回时间" />
                <el-table-column prop="mark" label="返回或处理备注" />
                <!-- <el-table-column prop="_create_time" label="详情" >
                  <el-button type="primary" size="small">详情</el-button>
                  </el-table-column> -->
              </el-table>
              <el-pagination
                style="display: flex; justify-content: end; margin-top: 15px"
                :current-page="zhifupage"
                :page-size="zhifulimit"
                :total="zhifutotal"
                :page-sizes="[10, 20, 30, 50]"
                layout="total, sizes, prev, pager, next, jumper"
                @size-change="zhifuSizechange"
                @current-change="zhifucurrent"
              />
            </div>
            <!-- 佣金明细 -->
            <div v-show="activeTab == 3" style="margin-top: 24px">
              <el-form
                :inline="true"
                style="margin-top: 20px"
                :model="formInline"
                class="demo-form-inline"
              >
                <el-form-item label="客户编号">
                  <el-form-item>
                    <el-input
                      v-model="uid"
                      placeholder="请输入关键字"
                      clearable
                    />
                  </el-form-item>
               
                </el-form-item>

                <el-form-item style="width: 230px">
                  <el-date-picker
                  v-model="ranges"
                type="daterange"
                range-separator="To"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                @change="getTime2"
                value-format="YYYY-MM-DD HH:mm:ss"

                />
                </el-form-item>
                <el-button
                  type="primary"
                  @click="userSee"
                  style="position: relative; top: -10px"
                  >查询</el-button
                >
              </el-form>
              <el-table :data="yongjingList" style="width: 100%">
                <el-table-column prop="uid" label="客户编号" />
                <el-table-column prop="company" label="昵称" />
                <el-table-column prop="_trade_type_text" label="交易类型" />
                <el-table-column prop="_change_type_text" label="变动类型" />
                <el-table-column prop="money" label="交易金额" />
                <el-table-column prop="before" label="变化(前)" />
                <el-table-column prop="after" label="变化(后)" />
                <el-table-column prop="_create_time" label="交易日期" />
              </el-table>
              <el-pagination
                style="display: flex; justify-content: end; margin-top: 15px"
                :current-page="yongpage"
                :page-size="yongLimit"
                :total="yongcount"
                :page-sizes="[10, 20, 30, 50]"
                layout="total, sizes, prev, pager, next, jumper"
                @size-change="yongchange"
                @current-change="yongcurrent"
              />
            </div>
            <!-- 客户登录日志 -->
            <div v-show="activeTab == 4" style="margin-top: 24px">
              <el-form
                :inline="true"
                :model="formInline"
                class="demo-form-inline"
              >
                <el-form-item label="商品信息" style="width: 200px">
                  <el-select
                    v-model="formInline.key_type"
                    placeholder="用户ID"
                    style="width: 200px"
                    @change="getselect1()"
                  >
                    <el-option
                      v-for="item in searchselectdata"
                      :key="item.value"
                      :label="item.lable"
                      :value="item.value"
                    />
                  </el-select>
                </el-form-item>
                <el-form-item>
                  <el-input
                    v-model="formInline._key_word"
                    placeholder="请输入关键字"
                    clearable
                    disabled
                  />
                </el-form-item>
                <el-form-item style="width: 200px">
                  <el-select
                    v-model="formInline.key_type"
                    placeholder="登录状态"
                    style="width: 200px"
                    @change="getselect1()"
                  >
                    <el-option
                      v-for="item in searchselectdata"
                      :key="item.value"
                      :label="item.lable"
                      :value="item.value"
                    />
                  </el-select>
                </el-form-item>
                <el-button
                  type="primary"
                  @click="submitSee"
                  style="position: relative; top: -10px"
                  >查询</el-button
                >
              </el-form>
              <el-table :data="loginlist" style="width: 100%">
                <el-table-column prop="id" label="用户ID" />
                <el-table-column prop="nickname" label="用户名" />
                <el-table-column prop="log_type" label="状态" />
                <el-table-column prop="ip" label="IP" />
                <el-table-column prop="province" label="地区1" />
                <el-table-column prop="city" label="地区2" />
                <el-table-column prop="create_time_date" label="时间" />
              </el-table>
              <!-- 客户登录日志 -->
              <div
                style="
                  padding-bottom: 45px;
                  display: flex;
                  justify-content: center;
                  margin-top: 32px;
                "
              >
                <el-pagination
                  :current-page="userpage"
                  :page-size="userLimit"
                  :total="usercount"
                  :page-sizes="[10, 20, 30, 50]"
                  layout="total, sizes, prev, pager, next, jumper"
                  @size-change="userhandlePageSizeChange"
                  @current-change="userhandleCurrentPageChange"
                />
              </div>
            </div>
          </div>
        </div>
      </div>
    </el-drawer>
    <!-- 图片预览对话框 -->
    <div class="image-overlay">
      <el-dialog v-model="imgShow" :show-close="false" width="36%">
        <img style="width: 100%" :src="currentImage" alt="" />
      </el-dialog>
    </div>
    <!-- 切换用户等级 -->
    <el-dialog
      v-model="dialogVisible"
      title="用户等级"
      width="30%"
      :before-close="handleClose"
    >
      <el-select v-model="level_id" class="m-2">
        <el-option
          v-for="item in kehuList"
          :key="item.value"
          :label="item.lable"
          :value="item.value"
        />
      </el-select>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="dialogVisible = false">取消</el-button>
          <el-button type="primary" @click="btnEdintdingji2"> 确定 </el-button>
        </span>
      </template>
    </el-dialog>

    <!-- 点击下级数出现的数据 -->
    <el-dialog
      draggable
      v-model="userListShow"
      title="用户列表"
      :show-close="false"
      width="66%"
    >
      <div class="shop-conten">
        <el-table :data="userDate" border style="width: 100%">
          <el-table-column prop="id" label="编号" />

          <el-table-column prop="headurl_img" label="头像" #default="scope">
            <img
              style="width: 50px; height: 50px"
              @click="openImagePreview(scope.row.headurl_img)"
              v-if="scope.row.headurl_img"
              class="imgs"
              :src="scope.row.headurl_img"
              alt=""
            />
          </el-table-column>
          <el-table-column prop="username" label="账号" />
          <el-table-column prop="company" label="昵称" />
          <el-table-column prop="_level_name" label="用户等级" />
          <el-table-column prop="balance" label="余额" />
          <el-table-column prop="cost" label="消费" />
          <el-table-column prop="commission_money" label="佣金" />
          <el-table-column prop="freez_money" label="冻结金额" />
          <el-table-column prop="child_count" label="下级数" />
          <el-table-column prop="pid" label="上级" />
          <el-table-column prop="reg_province" label="地区" />
          <el-table-column prop="_status" label="状态" />
        </el-table>
      </div>

      <!-- <div style="display: flex; justify-content: center; margin-top: 32px">
        <el-button type="primary" @click="btnEdintUser">提交</el-button>
      </div> -->
    </el-dialog>
    <!-- 批量修改用户状态 -->
    <el-dialog
      draggable
      v-model="statusShow2"
      title="批量修改用户状态"
      :show-close="false"
      width="26%"
    >
      <div class="shop-conten">
        <el-radio-group v-model="status2">
          <el-radio :label="1">开通</el-radio>
          <el-radio :label="0">关闭</el-radio>
        </el-radio-group>
      </div>

      <div style="display: flex; justify-content: center; margin-top: 32px">
        <el-button type="primary" @click="btnEdintUser">提交</el-button>
      </div>
    </el-dialog>
    <!-- 详情修改等级 -->
    <el-dialog
      draggable
      v-model="levelidShow2"
      :title="titleShow"
      :show-close="false"
      width="26%"
    >
      <div class="shop-conten2">
        <div>
          <span>当前级别</span>
          <div style="margin-top: 12px">
            <el-input v-model="dengji" disabled placeholder="Please input" />
          </div>
        </div>
        <div>
          <span style="position: relative; top: 12px">用户等级</span>
          <div style="margin-top: 12px; margin-left: -6px">
            <el-select
              v-model="level_id"
              class="m-2"
              @change="getDengji(level_id)"
            >
              <el-option
                v-for="item in kehuList"
                :key="item.value"
                :label="item.lable"
                :value="item.value"
              />
            </el-select>
          </div>
        </div>
      </div>

      <div style="display: flex; justify-content: center; margin-top: 32px">
        <el-button type="primary" @click="btnEdintdingji3">提交</el-button>
      </div>
    </el-dialog>


   <!-- 重置密钥 -->
   <el-dialog
      draggable
      v-model="congzhiShow"
      title="重置密钥"
      :show-close="false"
      width="46%"
    >
      <div>
         <div>
          <div style="display: inline-block;width: 180px;">进货接口:</div>
            <el-radio-group v-model="income_order" style="position: relative;top: 3px;">
            <el-radio :label="1">已开通</el-radio>
            <el-radio :label="0">未开通</el-radio>
           
          </el-radio-group>
         </div>
         <div style="margin-top: 12px;" v-show="income_order ==1">
          <div style="display: inline-block;width: 180px;">进货接口访问密钥:</div>
            <el-input v-model="income_key" style="width: 248px;" />
            <el-button type="primary" style="margin-left: 12px;" @click="openjinghuo">生成</el-button>
         </div>

         <div>
          <div style="display: inline-block;width: 180px;">平台对接:</div>
            <el-radio-group v-model="flatform_inter" style="position: relative;top: 3px;">
            <el-radio :label="1">已开通</el-radio>
            <el-radio :label="0">未开通</el-radio>
           
          </el-radio-group>
         </div>

         <div style="margin-top: 12px;"  v-show="flatform_inter ==1">
          <div style="display: inline-block;width: 180px;">平台对接密钥:</div>
            <el-input v-model="flatform_key" style="width: 248px;" />
            <el-button type="primary" style="margin-left: 12px;" @click="openjinghuo2">生成</el-button>
         </div>

         <div v-show="flatform_inter ==1">
          <div style="display: inline-block;width: 180px;">平台对接扣款方式:</div>
            <el-radio-group v-model="cut_money_type" style="position: relative;top: 3px;">
            <el-radio :label="0">SUP扣款</el-radio>
            <el-radio :label="1">前台扣款</el-radio>
           
          </el-radio-group>
         </div>
         
      </div>
      

      <div style="display: flex; justify-content: center; margin-top: 32px">
        <el-button type="primary" @click="openOk">提交</el-button>
      </div>
    </el-dialog>


<!-- 重置密钥 -->
<el-dialog
      draggable
      v-model="gonghuoShow"
      title="供货配置"
      :show-close="false"
      width="46%"
    >
      <div>
         <div>
          <div style="display: inline-block;width: 180px;">面向全站供货是否需要审核:</div>
            <el-radio-group v-model="is_check" style="position: relative;top: 3px;">
            <el-radio :label="1">是</el-radio>
            <el-radio :label="0">否</el-radio>
           
          </el-radio-group>
         </div>
         <div style="margin-top: 12px;">
          <div style="display: inline-block;width: 180px;">供货商结算规则:</div>
          <el-radio-group v-model="ghs_jiesuan_type" style="position: relative;top: 3px;">
            <el-radio :label="1">销售值</el-radio>
            <el-radio :label="0">成本值</el-radio>
           
          </el-radio-group>
         </div>
         <div style="margin-top: 12px;">
          <div style="display: inline-block;width: 180px;">全网供货商品上限:</div>
            <el-input v-model="is_huo" style="width: 248px;" />
            
         </div>
         <div>
          <div style="display: inline-block;width: 180px;">供货转余额免审核:</div>
            <el-radio-group v-model="transter_blance" style="position: relative;top: 3px;">
            <el-radio :label="0">关闭</el-radio>
            <el-radio :label="1">开启</el-radio>
           
          </el-radio-group>
         </div>
         <div>
          <div style="display: inline-block;width: 180px;">供货接口:</div>
            <el-radio-group v-model="hand_order" style="position: relative;top: 3px;">
            <el-radio :label="0">未开通</el-radio>
            <el-radio :label="1">已开通</el-radio>
           
          </el-radio-group>
         </div>
         <div style="margin-top: 12px;" v-show="hand_order == 1">
          <div style="display: inline-block;width: 180px;">供货接口访问密钥:</div>
            <el-input v-model="hand_key" style="width: 248px;" />
            <el-button type="primary" style="margin-left: 12px;" @click="openchangeRenewHand">生成</el-button>
         </div>
         <div style="margin-top: 12px;">
          <div style="display: inline-block;width: 180px;">订单通知地址:</div>
            <el-input v-model="hand_address" style="width: 248px;" />
            
         </div>
      </div>
      

      <div style="display: flex; justify-content: center; margin-top: 32px">
        <el-button type="primary" @click="openOk2">提交</el-button>
      </div>
    </el-dialog>







    <!-- 批量修改等级 -->
    <el-dialog
      draggable
      v-model="levelidShow"
      title="批量修改用户等级"
      :show-close="false"
      width="26%"
    >
      <div class="shop-conten">
        <el-select v-model="level_id" class="m-2">
          <el-option
            v-for="item in kehuList"
            :key="item.value"
            :label="item.lable"
            :value="item.value"
          />
        </el-select>
      </div>

      <div style="display: flex; justify-content: center; margin-top: 32px">
        <el-button type="primary" @click="btnEdintdingji">提交</el-button>
      </div>
    </el-dialog>

    <!-- 批量修改上级操作 -->
    <el-dialog
      v-model="statusShow"
      :show-close="false"
      draggable
      title="批量修改上级操作"
      width="36%"
    >
      <div class="img-area">
        <div>
          <div class="jibies">
            <el-form-item label="">
              <el-switch v-model="piliangstatus" />
            </el-form-item>
          </div>
        </div>
      </div>
      <div style="display: flex; justify-self: center">
        <el-button type="primary" @click="btnopenaccountpay">保存</el-button>
      </div>
    </el-dialog>
    <!-- 批量上级绑定解绑 -->
    <el-dialog
      v-model="shangjiShow"
      :show-close="false"
      draggable
      title="批量上级绑定解绑"
      width="36%"
    >
      <div class="img-area">
        <div>
          <div class="jibies">
            <div class="selects">
              <div>当前用户</div>
              <el-input
                v-model="tabslistssId"
                disabled
                style="margin-top: 12px"
              />
            </div>
            <div class="selects">
              <div>上级ID</div>
              <el-input v-model="op" placeholder="不填则解绑为上级"  style="margin-top: 12px" />
            </div>
          </div>
        </div>
      </div>
      <div style="display: flex; justify-self: center; margin-top: 18px">
        <el-button type="primary" @click="btnOp">保存</el-button>
      </div>
    </el-dialog>
    <!-- 批量上级绑定解绑 -->
    <el-dialog
      v-model="shangjiShow2"
      :show-close="false"
      draggable
      title="上级绑定解绑"
      width="36%"
    >
      <div class="img-area">
        <div>
          <div class="jibies">
            <div class="selects">
              <div>当前用户</div>
              <el-input
                v-model="tabslistssId"
                disabled
                style="margin-top: 12px"
              />
            </div>
            <div class="selects">
              <div>上级ID</div>
              <el-input v-model="op" placeholder="不填则解绑为上级" style="margin-top: 12px" />
            </div>
          </div>
        </div>
      </div>
      <div style="display: flex; justify-self: center; margin-top: 18px">
        <el-button type="primary" @click="btnOp3">保存</el-button>
      </div>
    </el-dialog>


    <!-- 批量上发送短信 -->
    <el-dialog
      v-model="textmessageShow"
      :show-close="false"
      draggable
      title="批量上级绑定解绑"
      width="36%"
    >
      <div class="img-area">
        <div>
          <div class="jibies">
            <div class="selects">
              <div>主题</div>
              <el-input v-model="title" style="margin-top: 12px" />
            </div>
            <div class="selects">
              <div>内容</div>
              <el-input
                type="textarea"
                v-model="content"
                style="margin-top: 12px"
              />
            </div>
          </div>
        </div>
      </div>
      <div style="display: flex; justify-self: center; margin-top: 18px">
        <el-button type="primary" @click="btnSend">保存</el-button>
      </div>
    </el-dialog>

    <!-- 登录密码重置成功 -->
    <el-dialog
      v-model="passwordShows"
      :show-close="false"
      draggable
      title="登录密码重置成功"
      width="36%"
    >
      <div class="img-area">
        重置密码为:{{ passwordShowname }}
        <span
          @click="btnOrdersn(passwordShowname)"
          style="position: relative; top: 2px; left: 6px"
          ><el-icon> <CopyDocument /> </el-icon
        ></span>
      </div>
      <div style="display: flex; justify-self: center; margin-top: 18px">
        <el-button type="primary" @click="passwordShows = false"
          >确认</el-button
        >
      </div>
    </el-dialog>

    <!-- 登录密码重置成功 -->
    <el-dialog
      v-model="passwordShows2"
      :show-close="false"
      draggable
      title="交易密码重置成功"
      width="36%"
    >
      <div class="img-area">
        交易重置密码为:{{ passwordShowname2 }}
        <span
          @click="btnOrdersn(passwordShowname2)"
          style="position: relative; top: 2px; left: 6px"
          ><el-icon> <CopyDocument /> </el-icon
        ></span>
      </div>
      <div style="display: flex; justify-self: center; margin-top: 18px">
        <el-button type="primary" @click="passwordShows2 = false"
          >确认</el-button
        >
      </div>
    </el-dialog>

    <!-- 修改余额 -->
    <el-dialog
      draggable
      v-model="moneyShow"
      title="批量修改消费"
      :show-close="false"
      width="46%"
    >
      <div>
        <div class="selects" style="margin-left: 0">
          <div style="margin-left: 12px">操作类型</div>
          <el-select style="margin-top: 12px" v-model="trade_type" class="m-2">
            <el-option
              v-for="item in tradetypeList"
              :key="item.value"
              :label="item.lable"
              :value="item.value"
            />
          </el-select>
        </div>
        <div class="selects">
          <div>操作金额</div>
          <el-input-number
            style="margin-top: 12px"
            v-model="money"
            :min="0"
            
            @change="handleChange"
          />
        </div>
        <div class="selects">
          <div>确认金额</div>
          <el-input-number
            style="margin-top: 12px"
            v-model="remoney"
            :min="0"
           
            @change="handleChange"
          />
        </div>
        <div class="selects">
          <span style="margin-top: 12px">备注</span>
          <el-input
            style="margin-top: 12px"
            v-model="desc"
            :rows="2"
            type="textarea"
            placeholder="请输入操作备注"
          />
        </div>
      </div>

      <div style="display: flex; justify-content: center; margin-top: 32px">
        <el-button type="primary" @click="lalanceOk">提交</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script lang="ts" setup>
import {
  unbindMyFalter,
  delOrder,
  unbindUserQQForIds,
  unbindUserWechatForIds,
  changePayPasswordForIds,
  userLevelList,
  editUserLevelForIds,
  updateStatus,
  updateStatus2,
  changeMyMoney,
  smsSend,
  getUserMoneyLog,
  userLoginLog,
  changeRenewLoginPassword,
  changeRenewPayPassword,
  changeRenewIncome,
  changeUserTurnMoney,
  changeUserTeamHead,
  getSonList,
  payInfo,
  editFlatformForIds,
  changeRenewFlatform,
  changeRenewHand,
  changeUserR,
  getOrderPayType
} from "~/base/api/order/orderList.ts";
import {
  getList,
  getCustomerListRenderBeforeData,
} from "~/base/api/admin/adminList.ts";
import {
  PictureFilled,
  ArrowDown,
  CopyDocument,
  Picture,
  ArrowUp,
} from "@element-plus/icons-vue";
import { reactive, ref, onMounted, onBeforeUnmount } from "vue";
import axios from "axios";
import { Loading } from "@element-plus/icons-vue";
import {
  ElMessageBox,
  ElMessage,
  ElLoading,
  componentSizeMap,
} from "element-plus";
import { curry, range } from "lodash-es";
import { select } from "radash";
import order from "@/router/static-routes/order";
import { Row } from "element-plus/lib/components/table-v2/src/components/index.js";
import item from "@/layouts/components/menu/item";
import { Label } from "radix-vue";
const is_check=ref(0)
const names = ref(0);
const heShow = ref(true);
const now=ref("")
const lastMonth=ref("")
const dialogVisible = ref(false);
const ghs_jiesuan_type=ref(0)
const transter_blance=ref(0)
const hand_key=ref('')
const hand_address=ref("")
const hand_order=ref(0)
const is_huo=ref("")
const wuliuSelect = ref(false);
const _pay_source=ref("0")
const _key_word=ref("")

const congzhiShow=ref(false)
const passwordShow = ref(true);
const time_range1 = ref("2023-07-01 00:00:00");
const time_range2 = ref("2025-08-06 23:59:59");

const time_range3 = ref("2023-07-01 00:00:00");
const time_range4 = ref("2025-08-06 23:59:59");


const titleShow = ref("");
const zhifupage = ref(1);
const zhifulimit = ref(10);
const statusShow = ref(false);
const zhifutotal = ref(0);
const searchList=ref([
{
    label:'全部',
    value:'0'
  },
  {
    label:'商户单号',
    value:'1'
  },
  {
    label:'交易单号',
    value:'2'
  },
  {
    label:'公司名称',
    value:'4'
  },
  {
    label:'支付金额',
    value:'5'
  },

])
const levelidShow = ref(false);
const levelidShow2 = ref(false);
const tabslistssId = ref("");
const piliangstatus = ref(true);
const trade_types = ref("-1");
const trade_type = ref("-1");
const turn_money = ref(false);
const money = ref("");
const loginlist = ref([]);
const remoney = ref("");
const userDate = ref([]);
const userListShow = ref(false);
const gonghuoShow=ref(false)
const desc = ref("");
const owner_goods=ref(false)
const userpage = ref(1);
const jiluList = ref([]);
const yongjingList=ref([])
const yongcount=ref(0)
const userLimit = ref(10);
const usercount = ref(0);
const income_order=ref(0)
const _pay_way=ref('-1')
const cut_money_type=ref(0)
const income_key=ref("")
const flatform_inter=ref(0)
const _dual_status=ref("-1")
const zongduanList=ref([
  {
    value:'0',
   label:'全部终端'
  },
  {
    value:'1',
   label:'电脑端'
  },
  {
    value:'2',
   label:'APP端'
  },
  {
    value:'3',
   label:'手机端'
  },
])
const zhifuzhuangtai=ref([
    {
      value: '-1',
      label: '全部支付状态',
    },
    {
      value: '1',
      label: '自动到账成功',
    },
    {
      value: '2',
      label: '手动补款成功',
    },
    {
      value: '3',
      label: '手动补款失败',
    }
])
const zhifuleixList=ref([
    {
      value: '-1',
      label: '全部支付方式',
    },
    {
      value: 'alipay',
      label: '支付宝',
    },
    {
      value: 'qqpay',
      label: 'QQ钱包',
    },
    {
      value: 'wxpay',
      label: '微信支付',
    }
])
const tradetypeList = ref([
  { value: "1", lable: "加款给客户" },
  { value: "2", lable: "扣客户款" },
  { value: "3", lable: "冻结金额" },
  { value: "4", lable: "金额解冻" },
  { value: "5", lable: "加款并冻结" },
  { value: "6", lable: "解冻并扣款" },
  { value: "24", lable: "前台转款入账" },
  { value: "53", lable: " 前台转款支出" },
]);
const kehuList = ref([]);
const moneyShow = ref(false);
const kehuShow = ref(false);
const deng = ref("");
const startProgress = ref(false);
const user_info = ref({});
const level_id = ref("");
const checkboxShow = ref(false);
const inputShow = ref(false);
const valss = ref("");
const disabledShow = ref(false);
const zanwuShow = ref(true);
const shangjiShow2=ref(false)
const imgShow = ref(false);
const yongpage=ref(1)
const yongLimit=ref(10)
const goodstypeName = ref("");
const goodstypeNames = ref(false);
// 图片预览相关状态
const previewVisible = ref(false);
const currentImage = ref("");
const statuss = ref("");

const drawer = ref(false);
const tabname = ref(0);

const activeTab = ref(0);
const tabsListAcitive = ref(0);
const tableData3 = ref([]);
const tableData4 = ref([]);
const tableData5 = ref([]);
const yueList = ref([]);
const tableData6 = ref([]);
const rechargeinfos = ref([]);
const ordercardidShow = ref(false);
const tabsList = ref([
  {
    name: "用户信息",
  },

  {
    name: "余额明细",
  },
  {
    name: "支付记录",
  },
  {
    name: "佣金明细",
  },
  {
    name: "客户登录日志",
  },
]);
const ordersn = ref("");
const tableData = ref([]);
const orderFor = ref({
  selectName: "",
});
const dengji = ref("");
const title = ref("");
const content = ref("");
const textmessageShow = ref(false);
const orderstatuslist = ref([]);
const searchselectdata = ref([]);
const goodstypeNamesShow = ref(false);
const tabslists = ref([]);
const tabslistss = ref([]);
const goodstypelist = ref([]);
const dockinglist = ref([]);
const ranges = ref([]);
const ranges2 = ref([]);
const status2 = ref(1);
const flatform_key=ref("")
const statusShow2 = ref(false);
const orderfrom = ref([]);
//下拉搜索
function getselect1() {
  getSetdocking();
}
function getselect2() {
  getSetdocking();
}
function getselect3() {
  getSetdocking();
}
function getselect4() {
  getSetdocking();
}
function getselect5() {
  getSetdocking();
}
function getKami(e) {
  console.log("这个获取的是什么", e, form.value.card_ids);
  let bobo = [];
  for (let item of e) {
    bobo.push(item.id);
  }
  console.log("测试波波是多少", bobo.join(","));
  form.value.card_ids = bobo.join(",");
}
//获取时间
function handleChange(e) {
  console.log("eee", e);
  const year = e[0].getFullYear();
  const month = String(e[0].getMonth() + 1).padStart(2, "0"); // 月份从0开始需+1
  const day = String(e[0].getDate()).padStart(2, "0");

  const year2 = e[0].getFullYear();
  const month2 = String(e[0].getMonth() + 1).padStart(2, "0"); // 月份从0开始需+1
  const day2 = String(e[0].getDate()).padStart(2, "0");

  formInline._time_range = `${year}-${month}-${day}`;
  console.log("ddddd11111", formInline._time_range);
  formInline._end_time_range = `${year2}-${month2}-${day2}`;
  return `${year}-${month}-${day}`;
  getSetdocking();
}
const selectedValue = ref("");

//点击展开
function btnHe() {
  heShow.value = false;
}
function btnHe2() {
  heShow.value = true;
}
//下拉选择
const usernamess = ref("");
const pids = ref("");
function handleSelectionChange(e) {
  console.log("eeeee", e);
  tabslists.value = e;
  tabslists.value = tabslists.value.map((res) => {
    return {
      id: res.id,
      username: res.username,
      pid: res.pid,
    };
  });

  tabslistss.value = tabslists.value;

  tabslistssId.value = tabslistss.value.map((item) => item.id).join(",");
  usernamess.value = tabslistss.value.map((item) => item.username).join(",");

  console.log("eeee", usernamess.value);
}
//批量删除
function addOpen() {
  console.log("tabslistss.value11", tabslistss.value);
  const result = tabslistss.value.map((item) => item.id).join(",");

  delOrder({ id: result }).then(() => {
    ElMessage.success("删除成功");
    //fetchData(); // 刷新列表
    getSetdocking();
  });
}
// 打开图片预览
const openImagePreview = (imageUrl) => {
  console.log("11111", imageUrl);
  currentImage.value = imageUrl;
  imgShow.value = true;
};

// 关闭图片预览
const closeImagePreview = () => {
  previewVisible.value = false;
};

// 更现代的复制函数（推荐）
async function btnOrdersn(orderSn) {
  try {
    // 使用现代clipboard API
    await navigator.clipboard.writeText(orderSn);

    // 显示成功提示
    if (ElNotification) {
      ElNotification({
        title: "复制成功",
        message: `已复制订单号：${orderSn}`,
        type: "success",
        duration: 1500,
      });
    } else {
      alert(`已复制：${orderSn}`);
    }
  } catch (err) {
    console.error("复制失败:", err);
    // 降级方案
    const tempTextarea = document.createElement("textarea");
    tempTextarea.value = orderSn;
    document.body.appendChild(tempTextarea);
    tempTextarea.select();

    try {
      document.execCommand("copy");
      ElMessage({
        message: "复制成功",
        type: "success",
      });
    } catch (fallbackErr) {
      console.error("降级复制失败:", fallbackErr);
    } finally {
      document.body.removeChild(tempTextarea);
    }
  }
}
// 更现代的复制函数（推荐）
async function btnOrdersn3(orderSn) {
  try {
    // 使用现代clipboard API
    await navigator.clipboard.writeText(orderSn);

    // 显示成功提示
    if (ElNotification) {
      ElNotification({
        title: "复制成功",
        message: `已复制订单号：${orderSn}`,
        type: "success",
        duration: 1500,
      });
    } else {
      alert(`已复制：${orderSn}`);
    }
  } catch (err) {
    console.error("复制失败:", err);
    // 降级方案
    const tempTextarea = document.createElement("textarea");
    tempTextarea.value = orderSn;
    document.body.appendChild(tempTextarea);
    tempTextarea.select();

    try {
      document.execCommand("copy");
      ElMessage({
        message: "复制成功",
        type: "success",
      });
    } catch (fallbackErr) {
      console.error("降级复制失败:", fallbackErr);
    } finally {
      document.body.removeChild(tempTextarea);
    }
  }
}
const xialimit = ref(10);
const xiapage = ref(1);
const xiastatus = ref("");
const levelid = ref("");
const goodsrole = ref("");
const _key_type=ref('0')
//点击列表下拉
function btnXia(e) {
  userListShow.value = e;
  let parm = {
    pid: e.id,
    limit: xialimit.value,
    page: xiapage.value,
    _key_type: keytype.value,
    _level_id: levelid.value,
    _status: xiastatus.value,
    _goods_role: goodsrole.value,
  };
  getSonList(parm).then((res) => {
    console.log("下拉数据", res);
    userDate.value = res.data.data;
  });
}

//列表选择状态
function getCahnge(e) {
  console.log("eeeeee", e);

  if (e.status == false) {
    e.status = 0;
  } else {
    e.status = 1;
  }
  let parm = {
    id: e.id,
    status: e.status,
  };
  updateStatus2(parm).then((res) => {
    if (res) {
      statusShow2.value = false;
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}
// 更现代的复制函数（推荐）
async function btnOrdersn2(orderSn) {
  try {
    // 使用现代clipboard API
    await navigator.clipboard.writeText(orderSn);

    // 显示成功提示
    if (ElNotification) {
      ElNotification({
        title: "复制成功",
        message: `已复制订单号：${orderSn}`,
        type: "success",
        duration: 1500,
      });
    } else {
      alert(`已复制：${orderSn}`);
    }
  } catch (err) {
    console.error("复制失败:", err);
    // 降级方案
    const tempTextarea = document.createElement("textarea");
    tempTextarea.value = orderSn;
    document.body.appendChild(tempTextarea);
    tempTextarea.select();

    try {
      document.execCommand("copy");
      ElMessage({
        message: "复制成功",
        type: "success",
      });
    } catch (fallbackErr) {
      console.error("降级复制失败:", fallbackErr);
    } finally {
      document.body.removeChild(tempTextarea);
    }
  }
}

//重置接口密钥
function btnpassword3() {
  congzhiShow.value=true
  return
  ElMessageBox.confirm(
    "确定重置接口密钥吗？",

    {
      confirmButtonText: "确认",
      cancelButtonText: "取消",
      type: "warning",
    }
  )
    .then(() => {
      changeRenewIncome({ id: ids.value }).then((res) => {
        if (res) {
          ElMessage.success("操作成功");
          getSetdocking();
        }
      });
    })
    .catch(() => {
      ElMessage({
        type: "info",
        message: "取消成功",
      });
    });
}

const passwordShows = ref(false);
const passwordShowname = ref("");
//重置密码
function btnpassword() {
  ElMessageBox.confirm(
    "是否确认密码",

    {
      confirmButtonText: "确认",
      cancelButtonText: "取消",
      type: "warning",
    }
  )
    .then(() => {
      changeRenewLoginPassword({ id: ids.value }).then((res) => {
        if (res) {
          passwordShows.value = true;
          passwordShowname.value = res.data.new_pass;

          ElMessage.success("操作成功");
          getSetdocking();
        }
      });
    })
    .catch(() => {
      ElMessage({
        type: "info",
        message: "取消成功",
      });
    });
}

const passwordShows2 = ref(false);
const passwordShowname2 = ref("");
//交易密码
function btnpassword2() {
  ElMessageBox.confirm(
    "是否确认密码",

    {
      confirmButtonText: "确认",
      cancelButtonText: "取消",
      type: "warning",
    }
  )
    .then(() => {
      changeRenewPayPassword({ id: ids.value }).then((res) => {
        if (res) {
          passwordShows2.value = true;
          passwordShowname2.value = res.data.new_pass;

          ElMessage.success("操作成功");
          getSetdocking();
        }
      });
    })
    .catch(() => {
      ElMessage({
        type: "info",
        message: "取消成功",
      });
    });
}

//打开供货权限
function getShowGood(e){
 
  if(e ==true){
    gonghuoShow.value=true
  }else{
    gonghuoShow.value=false
    openOk2()
  }
}

//支付记录搜索
function btnSearch(){
  zhifujilu()
}
//是否团长
function getShow(e) {
  console.log("e", e);
  if (e == true) {
    is_team_head.value = 1;
  } else {
    is_team_head.value = 0;
  }
  let parm = {
    id: ids.value,
    is_team_head: is_team_head.value,
  };
  changeUserTeamHead(parm).then((res) => {
    if (res) {
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}
//用户状态
function getShow5(e) {
  console.log("e", e);
  if(e == true){
      e=1
  }else {
    e=0
  }
  let parm = {
    id: ids.value,
    status: e,
  };
 updateStatus2(parm).then((res) => {
          if (res) {
            ElMessage.success("操作成功");
            getSetdocking();
          }
        });
    
      "是否修改用户状态?",

      {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }
  
  
}
//转账权限
function getShow2(e) {
  console.log("e", e, turn_money.value);
  if (e == true) {
    turn_money.value = 1;
  } else {
    turn_money.value = 0;
  }
  let parm = {
    id: ids.value,
    turn_money: turn_money.value,
  };
  if (e == true) {
    ElMessageBox.confirm(
      "是否进行转账权限?",

      {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }
    )
      .then(() => {
        changeUserTurnMoney(parm).then((res) => {
          if (res) {
            ElMessage.success("操作成功");
            getSetdocking();
          }
        });
      })
      .catch(() => {
        ElMessage({
          type: "info",
          message: "取消成功",
        });
      });
  } else {
    changeUserTurnMoney(parm).then((res) => {
      if (res) {
        ElMessage.success("操作成功");
        getSetdocking();
      }
    });
  }
}

//打开批量修改等级
function btnDengji() {
  if (tabslistssId.value == "") {
    ElMessage({
      showClose: true,
      message: "列表选择不能为空",
      type: "warning",
    });
    return;
  }
  levelidShow.value = true;
  level_id.value = "";
}
//确定用户状态
function btnEdintUser() {
  let parm = {
    ids: tabslistssId.value,
    status: status2.value,
  };
  updateStatus(parm).then((res) => {
    if (res) {
      statusShow2.value = false;
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}
//打开详情等级
function btnDetailDengji() {
  levelidShow2.value = true;
}
const usernames = ref("");

const dengjis=ref("")
//选择等级
function getDengji(e) {
  dengjis.value=e

 

}
//详情确定用户等级
function btnEdintdingji3() {
  for (let item of kehuList.value) {
    if (dengjis.value == item.value) {
      usernames.value = item.lable;
    }
  }
  dengji.value = usernames.value;
  let parm = {
    ids: ids.value,
    level_id: level_id.value,
  };
  editUserLevelForIds(parm).then((res) => {
    if (res) {
      levelidShow2.value = false;
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}
//确定用户等级
function btnEdintdingji() {
  if (level_id.value == "") {
    ElMessage({
      showClose: true,
      message: "用户等级不能为空",
      type: "warning",
    });
    return;
  }
  let parm = {
    ids: tabslistssId.value,
    level_id: level_id.value,
  };
  editUserLevelForIds(parm).then((res) => {
    if (res) {
      levelidShow.value = false;
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}
//确定用户等级
function btnEdintdingji2() {
  if (level_id.value == "") {
    ElMessage({
      showClose: true,
      message: "用户等级不能为空",
      type: "warning",
    });
    return;
  }
  let parm = {
    ids: id.value,
    level_id: level_id.value,
  };
  editUserLevelForIds(parm).then((res) => {
    if (res) {
      dialogVisible.value = false;
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}
//打开批量修改微信
function btnQQ() {
  if (tabslistssId.value == "") {
    ElMessage({
      showClose: true,
      message: "列表选择不能为空",
      type: "warning",
    });
    return;
  }
  unbindUserQQForIds({ ids: tabslistssId.value }).then((res) => {
    if (res) {
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}
//打开批量修改微信
function btnQQ2() {
  unbindUserQQForIds({ ids: ids.value }).then((res) => {
    if (res) {
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}

//供货访问
function openchangeRenewHand(){
  changeRenewHand({id:ids.value}).then((res)=>{
    console.log('供货访问',res)
    hand_key.value=res.data.new_pass
    ElMessage({
      showClose: true,
      message: res.data.info,
      type: "success",
    });
  })
}


//用户状态修改
function btnUser() {
  if (tabslistssId.value == "") {
    ElMessage({
      showClose: true,
      message: "列表选择不能为空",
      type: "warning",
    });
    return;
  }
  statusShow2.value = true;
  status2.value = 1;
}
//打开批量发送短信
function openSend() {
  if (tabslistssId.value == "") {
    ElMessage({
      showClose: true,
      message: "列表选择不能为空",
      type: "warning",
    });
    return;
  }
  textmessageShow.value = true;
  title.value = "";
  content.value = "";
}
//批量发送短信
function btnSend() {
  if (title.value == "") {
    ElMessage({
      showClose: true,
      message: "标题不能为空",
      type: "warning",
    });
    return;
  }
  if (content.value == "") {
    ElMessage({
      showClose: true,
      message: "内容不能为空",
      type: "warning",
    });
    return;
  }
  let parm = {
    ids: tabslistssId.value,
    title: title.value,
    content: content.value,
  };
  smsSend(parm).then((res) => {
    if (res) {
      textmessageShow.value = false;
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}
//批量上级绑定解绑
const op = ref("");
function btnShang() {
  console.log("看一下这个是啥", tabslists.value);
  // for(let item of tabslists.value){
  //   if(item.pid ==0){
  //     ElMessage({
  //     showClose: true,
  //     message: "上级ID不能为空",
  //     type: "warning",
  //   });
  //   return;
  //   }
  // }
  op.value = "";
  if (tabslistssId.value == "") {
    ElMessage({
      showClose: true,
      message: "列表选择不能为空",
      type: "warning",
    });
    return;
  }
  shangjiShow.value = true;
}
function btnOp3() {

  let parm = {
    child_no: tabslistssId.value,
    op: op.value,
  };
  unbindMyFalter(parm).then((res) => {
    if (res) {
      shangjiShow2.value = false;
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}

function btnOp() {
  if (op.value == "") {
    ElMessage({
      showClose: true,
      message: "上级ID不能为空",
      type: "warning",
    });
    return;
  }
  let parm = {
    child_no: tabslistssId.value,
    op: op.value,
  };
  unbindMyFalter(parm).then((res) => {
    if (res) {
      shangjiShow.value = false;
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}
function btnOp2() {
  shangjiShow2.value=true
}
//批量修改微信
function btnWixin() {
  if (tabslistssId.value == "") {
    ElMessage({
      showClose: true,
      message: "列表选择不能为空",
      type: "warning",
    });
    return;
  }
  unbindUserWechatForIds({ ids: tabslistssId.value }).then((res) => {
    if (res) {
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}
//修改微信
function btnWixin2() {
  unbindUserWechatForIds({ ids: ids.value }).then((res) => {
    if (res) {
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}

//打开批量交易密码
function btnJiao() {
  if (tabslistssId.value == "") {
    ElMessage({
      showClose: true,
      message: "列表选择不能为空",
      type: "warning",
    });
    return;
  }
  statusShow.value = true;
  piliang.value.status = "";
}
//批量修改交易密码
function btnopenaccountpay() {
  console.log("piliangstatus", piliangstatus.value);
  if (piliangstatus.value == true) {
    piliangstatus.value = 1;
  } else if (piliangstatus.value == false) {
    piliangstatus.value = 0;
  }
  let parm = {
    ids: tabslistssId.value,
    status: piliangstatus.value,
  };
  changePayPasswordForIds(parm).then((res) => {
    if (res) {
      ElMessage.success("操作成功");
      getSetdocking();
      statusShow.value = false;
    }
  });
}
const value2=ref('')
const noneed_userinput_pass = ref(true)
//批量修改交易密码
function btnopenaccountpay2() {


  if (value2.value== true) {
    noneed_userinput_pass.value = 1;
  } else if (value2.value == false) {
    noneed_userinput_pass.value = 0;
  }
  let parm = {
    ids: ids.value,
    status: noneed_userinput_pass.value,
  };
  changePayPasswordForIds(parm).then((res) => {
    if (res) {
      ElMessage.success("操作成功");
      getSetdocking();
      statusShow.value = false;
    }
  });
}

//多选
function getCheck(e) {
  form.value.checked1 = e;
}
//处理方式
function getStatus(e) {
  form.value.status = e;
  console.log("处理方式", e);
  if (e == 2) {
    form.value.recharge_hints = "订单正在处理中，请耐心等待!";
    recharge_hints.value = "期待下次光临！";
  } else if (e == 3) {
    form.value.recharge_hints = "订单交易成功，期待下次光临!";
    recharge_hints.value = "订单正在处理中，请耐心等待!";
  } else {
    form.value.recharge_hints = "订单交易失败，感谢您的支持!";
    recharge_hints.value = "感谢您的支持!";
  }
}
// 更现代的复制函数（推荐）
async function btnOrdersn5(orderSn) {
  try {
    // 使用现代clipboard API
    await navigator.clipboard.writeText(orderSn);

    // 显示成功提示
    if (ElNotification) {
      ElNotification({
        title: "复制成功",
        message: `已复制订单号：${orderSn}`,
        type: "success",
        duration: 1500,
      });
    } else {
      alert(`已复制：${orderSn}`);
    }
  } catch (err) {
    console.error("复制失败:", err);
    // 降级方案
    const tempTextarea = document.createElement("textarea");
    tempTextarea.value = orderSn;
    document.body.appendChild(tempTextarea);
    tempTextarea.select();

    try {
      document.execCommand("copy");
      ElMessage({
        message: "复制成功",
        type: "success",
      });
    } catch (fallbackErr) {
      console.error("降级复制失败:", fallbackErr);
    } finally {
      document.body.removeChild(tempTextarea);
    }
  }
}
const orderObj = ref({});
const orderotherinfo = ref({});
const allfieldlist = ref([]);
const ids = ref("");
const id = ref("");
const typeName = ref(false);
const uid=ref("")
const statusFang = ref(0);
const checked1 = ref(true);
const backmoney_type = ref(2);
const order_style = ref(1);
const shangjiShow = ref(false);
const backmoney_part = ref(1);
const recharge_hints = ref("");
const is_team_head = ref("");
const form2 = ref({
  card_ids: "",
  backmoney_part: "",
  address_company: "",
  money1: "",
  checked1: "true",
  backmoney_type: "2",
  order_style: "1",
  current_progress: "",
  target_progress: "",
  recharge_hints: "",
  start_progress: "",
  status: 3, // 数字
  address_ordersn: "",
});
const form = ref({
  card_ids: "",
  backmoney_part: "",
  address_company: "",
  money1: "",
  checked1: "true",
  backmoney_type: "2",
  order_style: "1",
  current_progress: "",
  target_progress: "",
  recharge_hints: "",
  start_progress: "",
  status: 3, // 数字
  address_ordersn: "",
});
const inputList = ref([]);

const checkIsMobile = () => {
  isMobile.value = window.innerWidth <= 768;
};
//点击列表价格
function btnbalance(e) {
  moneyShow.value = true;
  trade_type.value = "";
  money.value = "";
  remoney.value = "";
  desc.value = "";
  id.value = e.id;
}
//确定提交
function lalanceOk() {
  if (trade_type.value == "") {
    ElMessage({
      showClose: true,
      message: "类型不能为空",
      type: "warning",
    });
    return;
  }
  if (money.value == "") {
    ElMessage({
      showClose: true,
      message: "价格不能为空",
      type: "warning",
    });
    return;
  }
  if (remoney.value == "") {
    ElMessage({
      showClose: true,
      message: "确认价格不能为空",
      type: "warning",
    });
    return;
  }
  let parm = {
    trade_type: trade_type.value,
    money: money.value,
    remoney: remoney.value,
    desc: desc.value,
    id: id.value,
  };
  changeMyMoney(parm).then((res) => {
    console.log("resssss", res);
    if (res) {
      moneyShow.value = false;
      ElMessage.success("操作成功");
      getSetdocking();
    }
  });
}

//详情tab切换
function btnActive(index) {
  gettime()
  console.log("eeee", index);
  activeTab.value = index;
  let parm = {
    id: ids.value,
    page: 99,
    limit: 1,
  };

  if (index == 1) {
    getyue()
  } else if (index == 0) {
  } else if (index == 2) {
    zhifujilu();
  } else if (index == 4) {
    //客户登录日志
    let parm2 = {
      id: ids.value,
      page: userpage.value,
      limit: userLimit.value,
      trade_type: 3,
     
    };
    userLoginLog(parm2).then((res) => {
      console.log("客户登录日志", res);
      loginlist.value = res.data.data;
      usercount.value = Number(res.data.count);
      console.log("客户登录日志111111111111", usercount.value);
    });
  } else if (index == 3) {
    yongjilu()
  }
}
const dateValue = ref("");
//获取时间段
function getTime2(e) {
  console.log('cc', e);
  if (!e || !e[0] || !e[1]) return; // 确保日期范围有效
  // 使用 Element Plus 的 value-format 自动格式化日期
  time_range3.value = e[0]; 
  time_range4.value = e[1];
  console.log('time_range3',time_range3.value)
}

//获取时间段
function getTime3(e) {
  console.log('cc', e);
  if (!e || !e[0] || !e[1]) return; // 确保日期范围有效
  // 使用 Element Plus 的 value-format 自动格式化日期
  time_range1.value = e[0]; 
  time_range2.value = e[1];

}




const yuepage=ref(1)
const yuelimit=ref(10)
const yuecont=ref(0)
//搜索
function userSee(){
  yongjilu()
}
//搜索
function userSee2(){
  getyue()
}
//佣金记录的方法
function yongjilu(){
  console.log('明细时间',time_range3.value._value)
  let parm2 = {
      id: ids.value,
      page: yongpage.value,
      limit: yongLimit.value,
      time_range: time_range3.value + "###" + time_range4.value,
      trade_type: 3,
      uid:uid.value
    };
    getUserMoneyLog(parm2).then((res) => {
      console.log("佣金明细", res)
      yongjingList.value=res.data.data
      yongcount.value=Number(res.data.count)
    });
}
//余额明细记录的方法
function getyue(){
  console.log('明细时间',time_range3.value._value)
  let parm2 = {
      id: ids.value,
      page: yuepage.value,
      limit: yuelimit.value,
      time_range: time_range3.value + "###" + time_range4.value,
      trade_type: trade_type.value,
      uid:pids.value
    };
    getUserMoneyLog(parm2).then((res) => {
      console.log("佣金明细", res)
      yueList.value=res.data.data
      yuecont.value=Number(res.data.count)
    });
}
//支付记录执行方法
function zhifujilu() {
  let parm2 = {
    id: ids.value,
    page: zhifupage.value,
    limit: zhifulimit.value,
    time_range: time_range1.value + "###" + time_range2.value,
    _pay_way:_pay_way.value,
    _dual_status:_dual_status.value,
    _key_type:_key_type.value,
      _pay_source:_pay_source.value,
      _key_word:_key_word.value
  };
  payInfo(parm2).then((res) => {
    jiluList.value = res.msg.data;
    zhifutotal.value = Number(res.msg.count);
    console.log("支付记录111111", jiluList.value);
  });
}
//支付记录
function zhifuSizechange(e) {
  zhifulimit.value = e;
  zhifujilu();
}
function zhifucurrent(e) {
  zhifupage.value = e;
  zhifujilu();
}
//佣金记录
function yongchange(e) {
  yongLimit.value = e;
  yongjilu();
}
function yongcurrent(e) {
  yongpage.value = e;
  yongjilu();
}
//余额明细
function yuechange(e) {
  yuelimit.value = e;
  getyue();
}
function yuecurrent(e) {
  yuepage.value = e;
  getyue();
}
//登录日志分页
function userhandlePageSizeChange(e) {
  userLimit.value = e;
  let parm2 = {
    id: ids.value,
    page: userpage.value,
    limit: userLimit.value,
   
    trade_type: 3,
  };
  userLoginLog(parm2).then((res) => {
    console.log("客户登录日志", res);
    loginlist.value = res.data.data;
    usercount.value = Number(res.data.count);
  });
}
function userhandleCurrentPageChange(e) {
  userpage.value = e;
  let parm2 = {
    id: ids.value,
    page: userpage.value,
    limit: userLimit.value,
    trade_type: 3,
  };
  userLoginLog(parm2).then((res) => {
    console.log("客户登录日志", res);
    loginlist.value = res.data.data;
    usercount.value = Number(res.data.count);
  });
}
//订单处理输入框
const changedValues = ref({});
const radioDate = ref([]);
function getinput(value, key, title) {
  console.log(`输入框变化 - ${title} (${key}): ${value}`);

  changedValues.value[key] = value;
}
watch(
  changedValues,
  (newVal) => {
    console.log("当前保存的对象:", newVal);
    form.value.start_progres = newVal;
  },
  { deep: true }
);
const dataUser = ref([]);

//生成进货密钥
function openjinghuo(){
  changeRenewIncome({ id: ids.value }).then((res) => {

        if (res) {
          income_key.value=res.data.new_pass
          ElMessage.success("操作成功");
          getSetdocking();
        }
      });
}

//生成平台对接
function openjinghuo2(){
  changeRenewFlatform({ id: ids.value }).then((res) => {
        if (res) {
          flatform_key.value=res.data.new_pass
          ElMessage.success("操作成功");
          getSetdocking();
        }
      });
}


//提交
function openOk(){

  if(income_order.value ==1){
    if(income_key.value == ''){
    ElMessage({
      showClose: true,
      message: "进货接口访问密钥不能为空",
      type: "warning",
    });
    return;
  }
  }

  if(flatform_inter.value ==1){
    if(flatform_key.value == ''){
    ElMessage({
      showClose: true,
      message: "平台对接密钥不能为空",
      type: "warning",
    });
    return;
  }
  }

 

  let parm={
    income_order:income_order.value,
    income_key:income_key.value,
    flatform_inter:flatform_inter.value,
    flatform_key:flatform_key.value,
    cut_money_type:cut_money_type.value,
    ids:ids.value
  }
  editFlatformForIds(parm).then((res)=>{
    
    if (res) {
      congzhiShow.value = false;
      ElMessage.success("操作成功");
      getSetdocking();
    }else{
      console.log('失败')
    }
  })
}


//供货配置提交
function openOk2(){
  if(hand_order.value ==1){
    if(hand_key.value == ''){
    ElMessage({
      showClose: true,
      message: "供货接口访问密钥不能为空",
      type: "warning",
    });
    return;
  }
  }
  if(is_huo.value ==0 || is_huo.value=='' ){
    ElMessage({
      showClose: true,
      message: "全网供货商品上限不能为空或者不能为0",
      type: "warning",
    });
    return;
  }
  let parm={
    id:ids.value,
    is_check:is_check.value,
    ghs_jiesuan_type:ghs_jiesuan_type.value,
    is_huo:is_huo.value,
    transter_blance:transter_blance.value,
    hand_order:hand_order.value,
    hand_key:hand_key.value,
    hand_address:hand_address.value
  }
  changeUserR(parm).then((res)=>{
      if(res){
        gonghuoShow.value = false;
        ElMessage.success("操作成功");
        getSetdocking();
      }
  })
}



//查看详情
function btnSee(e, index) {
 
  cut_money_type.value=Number(e.cut_money_type)
  flatform_inter.value=Number(e.flatform_inter)
  console.log('确认这个值是多少',flatform_inter.value)
  income_order.value=Number(e.income_order)
  income_key.value=e.income_key
  flatform_key.value=e.flatform_key
  is_check.value=Number(e.is_check)
  ghs_jiesuan_type.value=Number(e.ghs_jiesuan_type)
  is_huo.value=e.is_huo
  transter_blance.value=Number(e.transter_blance)
  hand_order.value=Number(e.hand_order)
  hand_key.value=e.hand_key
  hand_address.value=e.hand_address
  ids.value = e.id;
  activeTab.value = 0;
  tabslistssId.value=e.id
  getCustomerListRenderBeforeData({ id: e.id }).then((res) => {
    console.log("详情结果", res);
    titleShow.value = "修改" + res.data.user_info.company + "等级";
  
    drawer.value = true;
    orderObj.value = res.data.user_info;
    noneed_userinput_pass.value=orderObj.noneed_userinput_pass
    value2.value=orderObj.noneed_userinput_pass
    pids.value=res.data.user_info.id
    if (orderObj.turn_money == 0) {
      orderObj.turn_money = false;
    } else {
      orderObj.turn_money = true;
    }
    dataUser.value = res.data.user_level_list;
    for (let item of res.data.user_level_list) {
      if (orderObj.value.level_id == item.value) {
        dengji.value = item.lable;
      }
    }
    if (orderObj.value.status == 1) {
      orderObj.value.status = true;
    } else {
      orderObj.value.status = false;
    }
    if (orderObj.value.noneed_userinput_pass == 1) {
      orderObj.value.noneed_userinput_pass = false;
    } else {
      orderObj.value.noneed_userinput_pass = true;
    }
    if (orderObj.value.weixin_nickname == "") {
      orderObj.weixin_nickname = "未绑定";
    }
    if (orderObj.value.qq == "") {
      orderObj.value.qq = "未绑定";
    }
    if (orderObj.value.is_team_head == 0) {
      orderObj.value.is_team_head = false;
    } else {
      orderObj.value.is_team_head = true;
    }
  });
}

//用户查看详情
function btnSee2(e, index) {
  if (e.pid == 0) {
    return;
  }
  ids.value = e.id;
  activeTab.value = 0;
  getCustomerListRenderBeforeData({ id: e.id }).then((res) => {
    console.log("详情结果", res);
    titleShow.value = "修改" + res.data.user_info.company + "等级";

    drawer.value = true;
    orderObj.value = res.data.user_info;
    console.log("详情结果pids", res.data.user_info,res.data.user_info.id)

    pids.value=res.data.user_info.id
 

    if (orderObj.turn_money == 0) {
      orderObj.turn_money = false;
    } else {
      orderObj.turn_money = true;
    }
    dataUser.value = res.data.user_level_list;
    for (let item of res.data.user_level_list) {
      if (orderObj.value.level_id == item.value) {
        dengji.value = item.lable;
      }
    }
    if (orderObj.value.status == 1) {
      orderObj.value.status = true;
    } else {
      orderObj.value.status = false;
    }
    if (orderObj.value.noneed_userinput_pass == 1) {
      orderObj.value.noneed_userinput_pass = false;
    } else {
      orderObj.value.noneed_userinput_pass = true;
    }
    if (orderObj.value.weixin_nickname == "") {
      orderObj.weixin_nickname = "未绑定";
    }
    if (orderObj.value.qq == "") {
      orderObj.value.qq = "未绑定";
    }
    if (orderObj.value.is_team_head == 0) {
      orderObj.value.is_team_head = false;
    } else {
      orderObj.value.is_team_head = true;
    }
  });
}




//用户查看详情
function btnSee3(e, index) {
  if (e.pid == 0) {
    return;
  }
  ids.value = e.id;
  activeTab.value = 0;
  getCustomerListRenderBeforeData({ id: e.id }).then((res) => {
    console.log("详情结果", e.pid);
    
    titleShow.value = "修改" + res.data.user_info.company + "等级";

    drawer.value = true;
    orderObj.value = res.data.user_info;
    pids.value=e.pid
    orderObj.id=e.pid
   console.log('获取的上级id',orderObj.id)
    if (orderObj.turn_money == 0) {
      orderObj.turn_money = false;
    } else {
      orderObj.turn_money = true;
    }
    dataUser.value = res.data.user_level_list;
    for (let item of res.data.user_level_list) {
      if (orderObj.value.level_id == item.value) {
        dengji.value = item.lable;
      }
    }
    if (orderObj.value.status == 1) {
      orderObj.value.status = true;
    } else {
      orderObj.value.status = false;
    }
    if (orderObj.value.noneed_userinput_pass == 1) {
      orderObj.value.noneed_userinput_pass = false;
    } else {
      orderObj.value.noneed_userinput_pass = true;
    }
    if (orderObj.value.weixin_nickname == "") {
      orderObj.weixin_nickname = "未绑定";
    }
    if (orderObj.value.qq == "") {
      orderObj.value.qq = "未绑定";
    }
    if (orderObj.value.is_team_head == 0) {
      orderObj.value.is_team_head = false;
    } else {
      orderObj.value.is_team_head = true;
    }
  });
}







const dataList = ref([]);
// 添加响应式检测
const isMobile = ref(false);

const channelTreeData = ref([]); // 渠道树形结构数据
const currentPage = ref(1); // 当前页码
const pageSize = ref(10); // 每页显示数量
const total = ref(0); // 总记录数
const keyword = ref("");
const keytype = ref("");

const formInline = reactive({
  _key_word: "",
  _key_type: "",
  _status: "",
  supplier_id: "",
  docking_id: "",
  cost_price: "",
  face_price: "",
  _goods_from: "",
  _goods_type: "",
  _time_range: "",
  _end_time_range: "",
  price: "",
});
const value = ref("");
const options =ref([])
function handleIpClick(ip) {
  const url = `https://www.ip138.com/iplookup.php?ip=${encodeURIComponent(ip)}`;
  window.open(url, "_blank"); // 打开新标签页
}
//用户等级
function btnDeng(e) {
  id.value = e.id;
  dialogVisible.value = true;
  level_id.value = "";
}
//点击tab切换
function btnName(e) {
  names.value = e;
}
//点击电锯切换
function btnTable(e) {
  tabname.value = e;
}
function handleUpdateNode({ id, property, value }) {
  // 更新树数据中对应节点的属性
  const updateNode = (nodes) => {
    return nodes.map((node) => {
      if (node.id === id) {
        return { ...node, [property]: value };
      }
      if (node.list) {
        return { ...node, list: updateNode(node.list) };
      }
      return node;
    });
  };
  channelTreeData.value = updateNode(channelTreeData.value);
}

// 删除方法
const handleDelete = (id: string) => {
  ElMessageBox.confirm("确定要删除这条记录吗?", "警告", {
    confirmButtonText: "确定",
    cancelButtonText: "取消",
    type: "warning",
  })
    .then(() => {
      // 这里调用删除API
      delOrder({ id: id }).then(() => {
        ElMessage.success("删除成功");
        //fetchData(); // 刷新列表
        getSetdocking();
      });
    })
    .catch(() => {
      ElMessage.info("已取消删除");
    });
};

// 查询处理
const handleQuery = () => {
  currentPage.value = 1; // 重置为第一页
  getSetdocking();
};

// 重置查询条件
const handleReset = () => {
  formInline.user = "";
  handleQuery();
};
// 分页尺寸变化
const handlePageSizeChange = (size: number) => {
  pageSize.value = size;
  getSetdocking();
};

// 页码变化
const handleCurrentPageChange = (page: number) => {
  currentPage.value = page;
  getSetdocking();
};
//获取下拉数据
function getOrderPayTypes(){
  getOrderPayType().then((res)=>{
    options.value=res.data
   
    for(let item of options.value){
          item.value=item.value.toString()
    }
    console.log('获取下拉数据',options.value)
  })  
}
//初始化
onMounted(() => {
  getuserLevelList();
  getSetdocking();
  gettime()
  getOrderPayTypes()



});

//格式化时间
function gettime(){
  now.value = new Date();
  lastMonth.value = new Date(now.value.getTime() - (30 * 24 * 60 * 60 * 1000));
  // 格式化并赋值
  if (lastMonth.value) {
    time_range1.value = formatDate(lastMonth.value); // 正确引用 .value
    time_range2.value = formatDate(now.value); // 正确引用 .value
    time_range3.value = formatDate(lastMonth.value);
    time_range4.value = formatDate(now.value);   
    ranges2.value=[time_range1.value,time_range2.value]
    ranges.value=[ time_range3.value, time_range4.value]
  }
}

//获取时间的方法
function formatDate(date) {
  if (!(date instanceof Date)) { // 检查是否是 Date 对象
    console.error("Invalid date object:", date);
    return "";
  }
  const year = date.getFullYear();
  const month = String(date.getMonth() + 1).padStart(2, '0');
  const day = String(date.getDate()).padStart(2, '0');
  const hours = String(date.getHours()).padStart(2, '0');
  const minutes = String(date.getMinutes()).padStart(2, '0');
  const seconds = String(date.getSeconds()).padStart(2, '0');
  return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;

}



//获取客户级别
function getuserLevelList() {
  userLevelList().then((res) => {
    console.log("客户级别", res);
    kehuList.value = res.data;
  });
}
//查询
function submitSee() {
  console.log("erer");
  getSetdocking();
}
function getFullInfoText(infoArray) {
  if (!Array.isArray(infoArray)) return "";

  // 过滤有效值并格式化为可读文本
  return infoArray
    .map((item) => {
      //const key = item.key?.trim() || "参数";
      const val = item.value?.toString() || "";
      return ` ${val}`;
    })
    .join("\n"); // 用换行符分隔每个条目
}

//列表
function getSetdocking() {
  
  // 显示 loading
  const loadingInstance = ElLoading.service({
    target: ".el-dialog", // 针对对话框区域
    lock: true,
    text: "正在加载数据中...",
    background: "rgba(0, 0, 0, 0.7)",
  });
  let parm = {
    page: currentPage.value,
    limit: pageSize.value,
    ...formInline,
  };
  getList(parm)
    .then((res) => {
      if (res.code == 200) {
        dataList.value = res.data.data;
        console.log("获取的数据", dataList.value);
        for (let item of dataList.value) {
          if (item.status == 1) {
            item.status = true;
          } else {
            item.status = false;
          }
        }
        if (res.data.data) {
          total.value = Number(res.data.count);
        }

        console.log("获取的数据222", dataList.value);
      }
    })
    .finally(() => {
      // 数据加载完成后关闭 loading
      loadingInstance.close();
    });
}
</script>
<style>
.el-input.is-disabled .el-input__wrapper {
  background: white !important;
}
</style>
<style scoped>
.deep .el-input.is-disabled .el-input__wrapper {
  background: white !important;
}
.order-titme {
}

.iconss {
  color: #999;
  cursor: pointer;
  position: relative;
  top: 3px;
}

.iconss:hover {
  color: #1890ff;
}

.icons {
  font-size: 21px !important;
  position: relative !important;
  top: 18px !important;
  padding-right: 28px !important;
  left: 12px !important;
}

.icons2 {
  font-size: 50px !important;
  position: relative !important;
  top: 10px !important;
  padding-right: 28px !important;
  left: 12px !important;
}

.sanfang {
  margin-left: 12px;
  font-size: 11px;
  color: #1890ff;
  cursor: pointer;
}
.lie-top {
  display: flex;
  justify-content: center;
}
.lie-input {
  width: 100%;
  background-color: white;
}
.orders-names {
}

.order-names {
  display: flex;
  margin-top: 15px;
}

.order-information {
}

.order-detail {
  height: 142px;
  border-bottom: 1px solid #3333;
  margin-top: 10px;
  font-size: 13px;
  padding-bottom: 14px;
}

.activeTab {
  border-bottom: 1px solid #1890ff !important;
  color: #1890ff !important;
}

.activeTabs {
  border-bottom: 1px solid #1890ff !important;
  color: #1890ff !important;
}
.searchtype{
  margin-left: 12px;
  width: 316px; 
  display:flex;
  position: relative;
  top: 12px;
}
.area-tab {
  display: flex;
  position: relative;
  left: -28px;
}
.area-tabs {
  height: 50vh;
  overflow: auto;
}
.selects {
  margin-left: 12px;
  margin-top: 12px;
}
.area-name {
  margin-left: 30px;
  cursor: pointer;
  height: 31px;
}

.areas-header {
  height: 32px;
  border-bottom: 1px solid #3333;
  width: 100%;
}

.bianhao {
  margin-top: 16px;
  margin-left: 9px;
  color: #1890ff;
  font-size: 13px;
  cursor: pointer;
}

.right-name {
  margin-left: 8px;
}

.areas {
  width: 98%;
  margin: 0 auto;

  margin-top: 40px;
}

.quxiao {
  /* color: white;
		background-color: rgba(0, 0, 0, .65); */
  font-size: 12px;
  margin-top: 8px;
}

.type-name {
  width: 118px;
}
.shop-conten {
  display: flex;
  justify-content: center;
}
.types {
  display: flex;
  margin-top: 30px;
  position: relative;
  margin-left: 8px;
  font-size: 13px;
}
.inputs2 {
  width: 60vw;
  padding-left: 12px;
}

.imgsleft {
  width: 70px;
  height: 70px;
}

.img-left {
  width: 9%;
}

.img-content {
  margin-top: 12px;
  display: flex;
}

.contents-title {
  display: flex;
  margin-top: 14vh;
  justify-content: space-between;
}

.unbers {
  color: #1890ff;
  background-color: #e8f4ff;
  border-color: #d1e9ff;
  margin-left: 12px;
  font-size: 11px;
  height: 22px;
  width: 56px;
  text-align: center;
}

.ordername {
  color: #333;
  border: 1px solid #3333;
  border-color: #333;
  /* padding: 1px 9px 1px 9px; */
  margin-left: 12px;
  height: 22px;
  width: 56px;
  text-align: center;
  font-size: 11px;
  line-height: 22px;
}

.kami {
  color: #13ce66;
  background-color: #e7faf0;
  border-color: #d0f5e0;
  font-size: 11px;
  height: 22px;
  width: 56px;
  text-align: center;
}
a {
  text-decoration: none;
  color: inherit;
}
.shu2 {
  width: 3px;
  height: 20px;
  background-color: #1890ff;
  position: relative;
  top: 25px;
  left: -8px;
}
.zhuangtai {
  display: flex;
  margin-top: 12px;
  font-size: 13px;
}
.imgs {
  width: 50px;
  height: 50px;
  position: relative;
  top: 4px;
  border-radius: 6px;
}

.table-name {
  color: #1890ff;

  margin: 0 auto;
  cursor: pointer;
  font-size: 11px;

  height: 23px;
  line-height: 23px;
}

.table-name2 {
  border-color: rgba(0, 0, 0, 0.65);
  color: white;
  padding: 3px 5px 3px 9px;
  cursor: pointer;
}

.footerss {
  display: flex;
  width: 96%;
  margin: 0 auto;
  font-size: 13px;
}

.footers {
  width: 98%;
  border: 1px solid #3333;
  margin: 0 auto;
  height: 100px;
  margin-top: 25px;
}

.tabname {
  color: #409eff !important;
  border-bottom: 2px solid #409eff !important;
}

.tab-name {
  margin-left: 18px;
  cursor: pointer;
  height: 30px;
}
.inputs {
  width: 120px;
  margin-left: 12px;
}
.header-area {
  display: flex;
  position: relative;
  left: -18px;
  top: 1px;
}

.names {
  background: #409eff !important;
  color: white !important;
  border: none !important;
}

.jiaoyi {
  background-color: #13ce66;
}

.header-name {
  border-radius: 20px;
  padding: 3px 16px 3px 16px;
  border: 1px solid #9999;
  margin-left: 12px;
  font-size: 13px;
  cursor: pointer;
}

.headers {
  display: flex;
  padding-bottom: 12px;
}

.m-2 {
  width: 360px;
}

.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.configurations {
  margin-top: 12px;
}

.configuration-area {
}

.dialog-footer {
  margin: 0 auto;
  margin-top: 30px;
  text-align: center;
}

.orders-name {
  margin-top: 12px;
}

.orders {
  margin-left: 12px;
}

.order-area {
  width: 98%;
  padding-bottom: 12px;
  border: 1px solid #409eff;
  background-color: #e8f4ff;
}
.zanwu {
  display: flex;
  justify-content: center;
  position: relative;
  top: 25vh;
}
.tabs-area {
  margin-top: 12px;
}
.he {
  margin-left: 12px;
  color: #1890ff;
  cursor: pointer;
}
.diolog-content {
}

.shu {
  width: 3px;
  height: 20px;
  background-color: #1890ff;
  position: relative;
  top: 19px;
}

.shuaxin {
  font-size: 12px;
  color: #409eff;
  padding-right: 2px;
  cursor: pointer;
}

.table-area {
  width: 98%;
  margin: 0 auto;
  margin-top: 30px;
}

.tabs-price {
  border: 1px solid #3333;
  padding: 5px 12px 3px 12px;
}

.timeShow {
  color: red !important;
}

.tabs {
  margin-left: 10px;
}

.tab-header {
  display: flex;
  width: 100%;
}
.info-area {
  display: flex;
  white-space: nowrap;
  width: 88%;

  text-overflow: ellipsis;
  white-space: nowrap;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;

  cursor: pointer;
}
.info-area2 {
}
.info-area:hover {
  color: #1890ff;
}
.area {
  width: 100%;
  background-color: white;
  padding-bottom: 28px;
  margin-top: 18px;
  padding-top: 14px;
}

.content {
  width: 96%;
  margin: 0 auto;
  height: 80vh;
  margin-top: 26px;
}

.header {
  background-color: white;
  padding: 17px 0 1px 12px;
  border-radius: 8px;
}

.is-loading {
  animation: rotating 2s linear infinite;
}

@keyframes rotating {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* 基础响应式设置 */
.content {
  width: 96%;
  margin: 0 auto;
  margin-top: 26px;
  padding-bottom: 20px;
}

/* 表格区域响应式 */
.table-area {
  width: 100%;
  margin: 0 auto;
  margin-top: 20px;
  overflow-x: auto;
}

/* 分页容器 */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  overflow-x: auto;
}

/* 对话框内容 */
.diolog-content {
  padding: 10px;
}

/* 标签页区域 */
.tabs-area {
  margin-top: 12px;
}

/* 配置区域 */
.configurations {
  margin-top: 12px;
}

/* 对话框底部按钮 */
.dialog-footer {
  margin: 20px auto 0;
  text-align: center;
}
.nameshopping {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 70px;
  cursor: pointer;
  text-align: center;
}
.mima {
  cursor: pointer;
  color: #1890ff;
  margin-left: 3px;
}
.nameshopping:hover {
  color: #1890ff;
}
/* 订单区域 */
.order-area {
  width: 100%;
  padding: 12px;
  border: 1px solid #409eff;
  background-color: #e8f4ff;
  box-sizing: border-box;
}

/* 刷新按钮样式 */
.shuaxin {
  font-size: 12px;
  color: #409eff;
  padding-right: 2px;
  cursor: pointer;
}

/* 加载动画 */
.is-loading {
  animation: rotating 2s linear infinite;
}

@keyframes rotating {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  /* 头部表单 */
  .header {
    padding: 10px;
  }

  /* 表单项目 */
  .el-form-item {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }

  /* 标签页 */
  .el-tabs {
    overflow-x: auto;
  }

  /* 对话框内容 */
  .diolog-content {
    padding: 5px;
  }

  /* 输入框宽度 */
  .el-input {
    width: 100% !important;
  }

  /* 表格操作按钮 */
  .el-table-column--fixed-right .el-button {
    margin-bottom: 5px;
  }

  /* 标签页头 */
  .tab-header {
    flex-direction: column;
  }

  .tabs {
    margin: 5px 0;
  }

  /* 对话框标题 */
  .el-dialog__title {
    font-size: 16px;
  }
}

/* PC端特定样式 */
@media (min-width: 769px) {
  .content {
    /* max-width: 1200px; */
  }

  .table-area {
    width: 98%;
  }

  .diolog-content {
    min-width: 500px;
  }

  .el-form--inline .el-form-item {
    margin-right: 10px;
  }
}
</style>
